/**
 * 
 */
package org.code.util;

import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

/**
 * @author daire
 * 2013-4-8
 */
public class NowTime {
		
		public static String getDate(){
		 	Calendar c = Calendar.getInstance(Locale.CHINA);
			c.setTime(new Date());
			return c.get(Calendar.YEAR)+"-"+(c.get(Calendar.MONTH)+1)+"-"+c.get(Calendar.DAY_OF_MONTH);
		}
		public static String getTime(){
		 	Calendar c = Calendar.getInstance(Locale.CHINA);
			c.setTime(new Date());
			return c.get(Calendar.HOUR_OF_DAY)+"";
		}
		
		
		public static void main(String[] args) {
			System.out.println(NowTime.getTime());
		}
}
